﻿using System;
using System.Net;
using System.Windows;
#if (WINRT)
using Windows.UI.Xaml;
using Windows.UI.Xaml.Markup;
using System.Windows.Input;
#else
using System.Windows.Markup;
using System.Windows.Input;
#endif

namespace nRoute.Components
{
    public class PageInfo
        : DependencyObject
    {
        public static readonly DependencyProperty TitleProperty = DependencyProperty.Register("Title", typeof(string),
            typeof(PageInfo), new PropertyMetadata(Utilities.Compatability.DP_UNSET_VALUE));

        public static readonly DependencyProperty SubTitleProperty = DependencyProperty.Register("SubTitle", typeof(string),
            typeof(PageInfo), new PropertyMetadata(Utilities.Compatability.DP_UNSET_VALUE));

        public static readonly DependencyProperty IconPathProperty = DependencyProperty.Register("IconPath", typeof(string),
            typeof(PageInfo), new PropertyMetadata(Utilities.Compatability.DP_UNSET_VALUE));

        public static readonly DependencyProperty PageCommandsProperty = DependencyProperty.Register("PageCommands", typeof(PageCommandCollection),
            typeof(PageInfo), new PropertyMetadata(Utilities.Compatability.DP_UNSET_VALUE));

        public static readonly DependencyProperty PageCrumbsProperty = DependencyProperty.Register("PageCrumbs", typeof(PageCommandCollection),
            typeof(PageInfo), new PropertyMetadata(Utilities.Compatability.DP_UNSET_VALUE));

        public static readonly DependencyProperty PageMenuProperty = DependencyProperty.Register("PageMenu", typeof(MenuCommandCollection),
            typeof(PageInfo), new PropertyMetadata(Utilities.Compatability.DP_UNSET_VALUE));

#region Properties

        public string Title
        {
            get { return Convert.ToString(GetValue(TitleProperty)); }
            set { SetValue(TitleProperty, value); }
        }

        public string SubTitle
        {
            get { return Convert.ToString(GetValue(SubTitleProperty)); }
            set { SetValue(SubTitleProperty, value); }
        }

        public string IconPath
        {
            get { return Convert.ToString(GetValue(IconPathProperty)); }
            set { SetValue(IconPathProperty, value); }
        }

        public PageCommandCollection PageCommands
        {
            get { return (PageCommandCollection)GetValue(PageCommandsProperty); }
            set { SetValue(PageCommandsProperty, value); }
        }

        public PageCommandCollection PageCrumbs
        {
            get { return (PageCommandCollection)GetValue(PageCrumbsProperty); }
            set { SetValue(PageCrumbsProperty, value); }
        }

        public MenuCommandCollection PageMenu
        {
            get { return (MenuCommandCollection)GetValue(PageMenuProperty); }
            set { SetValue(PageMenuProperty, value); }
        }

#endregion

    }
}
